export interface DetectRequest {
  network: string
  port: number
  username: string
  password: string
}

export interface DetectResponse {
  is_ssh: boolean
  info: string
  status: string
}

export interface DetectResult extends DetectResponse {
  timestamp: string
  request: DetectRequest
  port_open: boolean
}

export interface SSEMessage {
  type: 'start' | 'progress' | 'complete' | 'error'
  message: string
  progress?: number
  current?: number
  total?: number
  results?: ScanResult[]
}

export interface ScanResult {
  ip: string
  port: number
  username: string
  status: string
  message: string
}

export type FilterStatus = 'all' | 'port_closed' | 'auth_failed' | 'connected' | 'sudo_supported'

export interface ScanStats {
  total: number
  connected: number
  port_closed: number
  connection_failed: number
  root_privilege: number
  port_open: number
  auth_success: number
  sudo_support: number
  success_rate: string
}